/**
 * Generate code from /{{projectName}}-core/src/main/java/{{packageName}}/{{apis}}/dto/{{apiDtos@DEFAULT}}.java.hbs
 */
package cn.ibizlab.api.dto;

import java.util.*;
import java.io.Serializable;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.alibaba.fastjson.annotation.JSONField;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import cn.ibizlab.util.domain.DTOBase;
import cn.ibizlab.util.domain.DTOClient;
import lombok.*;
import lombok.experimental.Accessors;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * 系统角色[SysRoleDTO]
 *
 * @author generator
 */
@Getter
@Setter
@NoArgsConstructor
@Accessors(chain = true)
@ApiModel("系统角色DTO")
public class SysRoleDTO extends DTOBase implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 标识
     */
    @JsonProperty("id")
    @JSONField(name = "id")
    @ApiModelProperty(value = "标识", position = 0)
    private String id;

    /**
     * 名称
     */
    @JsonProperty("name")
    @JSONField(name = "name")
    @ApiModelProperty(value = "名称", position = 1)
    private String name;

    /**
     * 创建人
     */
    @JsonProperty("creator")
    @JSONField(name = "creator")
    @ApiModelProperty(value = "创建人", position = 2)
    private String creator;

    /**
     * 创建时间
     */
    @JsonProperty("create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh", timezone = "GMT+8")
    @JSONField(name = "create_time" , format = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间", position = 3)
    private Date createTime;

    /**
     * 最后更新人
     */
    @JsonProperty("updater")
    @JSONField(name = "updater")
    @ApiModelProperty(value = "最后更新人", position = 4)
    private String updater;

    /**
     * 最后更新时间
     */
    @JsonProperty("update_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh", timezone = "GMT+8")
    @JSONField(name = "update_time" , format = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "最后更新时间", position = 5)
    private Date updateTime;

    /**
     * DC
     */
    @JsonProperty("dc")
    @JSONField(name = "dc")
    @ApiModelProperty(value = "DC", position = 6)
    private String dc;

    /**
     * 角色代码标记
     */
    @JsonProperty("authority")
    @JSONField(name = "authority")
    @ApiModelProperty(value = "角色代码标记", position = 7)
    private String authority;

    /**
     * 系统标识
     */
    @JsonProperty("deploy_system_id")
    @JSONField(name = "deploy_system_id")
    @ApiModelProperty(value = "系统标识", position = 8)
    private String deploySystemId;

    /**
     * 系统名
     */
    @JsonProperty("system_id")
    @JSONField(name = "system_id")
    @ApiModelProperty(value = "系统名", position = 9)
    private String systemId;

    /**
     * 系统显示名称
     */
    @JsonProperty("system_display_name")
    @JSONField(name = "system_display_name")
    @ApiModelProperty(value = "系统显示名称", position = 10)
    private String systemDisplayName;

    /**
     * 是否是工作流用户组
     */
    @JsonProperty("workflow_group")
    @JSONField(name = "workflow_group")
    @ApiModelProperty(value = "是否是工作流用户组", position = 11)
    private Integer workflowGroup;

    /**
     * 范围
     */
    @JsonProperty("group_scope")
    @JSONField(name = "group_scope")
    @ApiModelProperty(value = "范围", position = 12)
    private String groupScope;

    /**
     * 描述
     */
    @JsonProperty("description")
    @JSONField(name = "description")
    @ApiModelProperty(value = "描述", position = 13)
    private String description;

    /**
     * 角色授权资源
     */
    @JsonProperty("granted_authorities")
    @JSONField(name = "granted_authorities")
    @ApiModelProperty(value = "角色授权资源", position = 14)
    private List<SysGrantedAuthorityDTO> grantedAuthorities;

    /**
     * 系统角色成员
     */
    @JsonProperty("member")
    @JSONField(name = "member")
    @ApiModelProperty(value = "系统角色成员", position = 15)
    private List<SysRoleMemberDTO> member;


    /**
     * 设置 [名称]
     */
    public SysRoleDTO setName(String name) {
        this.name = name;
        this.modify("name", name);
        return this;
    }

    /**
     * 设置 [DC]
     */
    public SysRoleDTO setDc(String dc) {
        this.dc = dc;
        this.modify("dc", dc);
        return this;
    }

    /**
     * 设置 [角色代码标记]
     */
    public SysRoleDTO setAuthority(String authority) {
        this.authority = authority;
        this.modify("authority", authority);
        return this;
    }

    /**
     * 设置 [系统标识]
     */
    public SysRoleDTO setDeploySystemId(String deploySystemId) {
        this.deploySystemId = deploySystemId;
        this.modify("deploy_system_id", deploySystemId);
        return this;
    }

    /**
     * 设置 [系统名]
     */
    public SysRoleDTO setSystemId(String systemId) {
        this.systemId = systemId;
        this.modify("system_id", systemId);
        return this;
    }

    /**
     * 设置 [系统显示名称]
     */
    public SysRoleDTO setSystemDisplayName(String systemDisplayName) {
        this.systemDisplayName = systemDisplayName;
        this.modify("system_display_name", systemDisplayName);
        return this;
    }

    /**
     * 设置 [是否是工作流用户组]
     */
    public SysRoleDTO setWorkflowGroup(Integer workflowGroup) {
        this.workflowGroup = workflowGroup;
        this.modify("workflow_group", workflowGroup);
        return this;
    }

    /**
     * 设置 [范围]
     */
    public SysRoleDTO setGroupScope(String groupScope) {
        this.groupScope = groupScope;
        this.modify("group_scope", groupScope);
        return this;
    }

    /**
     * 设置 [描述]
     */
    public SysRoleDTO setDescription(String description) {
        this.description = description;
        this.modify("description", description);
        return this;
    }

    /**
     * 设置 [角色授权资源]
     */
    public SysRoleDTO setGrantedAuthorities(List<SysGrantedAuthorityDTO> grantedAuthorities) {
        this.grantedAuthorities = grantedAuthorities;
        this.modify("granted_authorities", grantedAuthorities);
        return this;
    }

    /**
     * 设置 [系统角色成员]
     */
    public SysRoleDTO setMember(List<SysRoleMemberDTO> member) {
        this.member = member;
        this.modify("member", member);
        return this;
    }


}
